package cn.seqdata.rpt.summary;

import java.util.ArrayList;
import java.util.List;

import cn.seqdata.jpa.lookup.LookupKeyval;

/** 明细和汇总数据同时输出，明细在items，汇总在summary */
public abstract class DetailSummary<E, T extends LookupKeyval<E>, S extends Summary<T>> {
	public final List<T> items = new ArrayList<>();

	public S getSummary() {
		return createSummary(items);
	}

	protected abstract S createSummary(List<T> items);
}
